<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
//        function showme(uname){
//            alert("得到焦点"+uname.value)
//        }
        function clearme(uname) {
          //  uname.value="";
            uname.select()
        }
        function show(uname){
            alert("失去焦点"+uname.value)
        }
    </script>
</head>
<body>
<form action="" name="myform">
    <input type="text" name="uname" id="uname" value="请输入用户名" onfocus="clearme(this)" onblur="show(this)"/>
    <input type="submit"/>
</form>
<a href="check2.html">获取元素的方式</a>
</body>
</html>